// import { type } from "os";

import { type } from "os"

type Deck = NormalCard[]
enum CradColor {
    heart="❤",
    spade="♠",
    club="♦",
    diamond="♣"
}
enum mark {
    A="A",
    two="2",
    three = "3",
    four="4",
    five="5",
    six="6",
    seven="7",
    eight="8",
    nine="9",
    ten="10",
    eleven="J",
    twelve="Q",
    king="k"
}
type NormalCard = {
    color:CradColor,
    mark:mark
}
function createDock():Deck{
const deck:Deck = []; // 定义扑克
const marks = Object.values(mark)
const colors = Object.values(CradColor)
for (const m of marks) {
    const element = m;
    for(const c of colors){
        deck.push({
            color:c,
            mark:m
        })
    }
    
}
return deck
}
// function findCards(color:CradColor){

// }
function printDeck(deck:Deck){
    let result="\n";
    deck.forEach((item,index)=>{
       let  str= item.color+item.mark;
        result +=str+"\t"
       if((index+1)%6 ===0){
        result += "\n"
       }
    })
    
    console.log(result)
}
const deck = createDock()
printDeck(deck)